﻿using System;
using System.Collections.Generic;
using System.Globalization;

namespace MediaScraper
{
    public class VideoInfo
    {
        public string Identifier { get; set; }
        public string Name { get; set; }
        public int Year { get; set; }
        public IList<SubTitleInfo> SubTitleInfos { get; set; }
        public FileProcessInfo FileProcessInfo  { get; set; }

        public VideoInfo()
        {
            SubTitleInfos = new List<SubTitleInfo>();
            FileProcessInfo = new FileProcessInfo();
        }

        public void AddSubtitleInfo(Uri downloadLink,string rawFileName, CultureInfo culture)
        {
            SubTitleInfos.Add(new SubTitleInfo(){Culture = culture,RawFileName = rawFileName,DownloadLink = downloadLink});
        }
    }

    public class SeriesInfo : VideoInfo
    {
        public string SeriesName { get; set; }
        public int Season { get; set; }
        public int Episode { get; set; }

    }

    public class SubTitleInfo
    {
        public string RawFileName { get; set; }
        public Uri DownloadLink { get; set; }
        public CultureInfo Culture { get; set; }
    }

    public class FileProcessInfo
    {
        /// <summary>
        /// File name without extension
        /// </summary>
        public string FileName { get; set; }
        /// <summary>
        /// For Movies: Moviename. For Series: SeriesName
        /// </summary>
        public string ParentFolder { get; set; }
        /// <summary>
        /// For Movies: unused. For Series: Season
        /// </summary>
        public string FolderName { get; set; }
        public string SubtitleFileName { get; set; }
        public string DestinationFilePath { get; set; }

    }
}
